-- GENERATED SPELL FOR [Digger Flameforge] --


function spell0_5849(pUnit, Event) --@Backhand,n/a--
pUnit:FullCastSpellOnTarget(6253,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5849', 2310, 1)
end

function spell1_5849(pUnit, Event) --@Throw Dynamite,n/a--
pUnit:FullCastSpellOnTarget(7978,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5849', 1000, 1)
end

function Sorts_5849(pUnit, Event)
local choix_sorts_5849 = math.random(0, 1)
if choix_sorts_5849 == 0 then
pUnit:RegisterEvent('spell0_5849', 1, 1)
end
if choix_sorts_5849 == 1 then
pUnit:RegisterEvent('spell1_5849', 1, 1)
end
end

function mob5849_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5849', math.random(1500, 3000), 1)
end

function mob5849_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5849_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5849_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5849, 1, 'mob5849_Action')
RegisterUnitEvent(5849, 2, 'mob5849_Leave')
RegisterUnitEvent(5849, 3, 'mob5849_Kill')
RegisterUnitEvent(5849, 4, 'mob5849_Die')
